package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: HuoXu
 * @Date: 2023/07/26/16:21
 * @Description: 快乐跳跳虎
 */
@Mapper
public interface SetMealDishMapper {

    @Insert("insert into setmeal_dish (setmeal_id, dish_id, name, price, copies) VALUES " +
            "(#{setmealId},#{dishId},#{name},#{price},#{copies})")
    void add(SetmealDish dish);


    List<Long> queryByDishId(List<Long> ids);

    @Select("select * from setmeal_dish where setmeal_id =#{id}")
    List<SetmealDish> queryById(Long id);


    void deleteBySetMealId(List<Long> setmealid);

    void deleteBySetMealIds(List<Long> ids);
}
